<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8" />
        <title>SimpleCore</title>
        <link type="text/css" rel="stylesheet" href="SyntaxHighlighter/SyntaxHighlighter.css"/>
        <link type="text/css" rel="stylesheet" href="css/core.css"/>
        <link type="text/css" rel="stylesheet" href="../src/_beta/SimpleTip/tip.css"/>
    </head>
    <body>
        <div class="container clearfix" id="hd">
            <h1 class="s-logo"></h1>
            <div class="s-nav">
                <span class="s-nav-l"></span>
                <span class="s-nav-r"></span>
                <ul class="clearfix">
                    <li class="current">
                        <a href="doc.html">文档</a>
                    </li>
                    <li>
                        <a href="demo.html">示例</a>
                    </li>
                    <li>
                        <a href="#">下载</a>
                    </li>
                    <li>
                        <a href="deploy.html">部署</a>
                    </li>
                    <li>
                        <a href="#">关于</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="container" id="bd">
            <h2 class="s-title">SimpleUI</h2>
            <div class="clearfix doc-content">
                <div class="s-list">
                    <h3 class="s-list-title s-list-first">核心方法</h3>
                    <ul>
                        <li><a href="#namespace" data-href="doc/namespace.html">namespace</a></li>
                        <li><a href="#define" data-href="doc/define.html">define</a></li>
                        <li><a href="#require" data-href="doc/require.html">require</a></li>
                        <li><a href="#declareAndPlugin" data-href="doc/declareAndPlugin.html">declare</a></li>
                        <li><a href="#plugin" data-href="doc/plugin.html">plugin</a></li>
                        <li><a href="#bridgeTojQuery" data-href="doc/bridgeTojQuery.html">bridgeTojQuery</a></li>
                    </ul>
                    <h3 class="s-list-title">交互</h3>
                    <ul>
                        <li><a href="#DragAndDrop" data-href="doc/DragAndDrop.html">Drag and Drop</a></li>
                        <li><a href="#resize" data-href="doc/resize.html">Resize</a></li>
                        <li><a href="#selectable" data-href="doc/selectable.html">Selectable</a></li>
                        <li><a href="#" data-info="beta" class="gray">Utility</a></li>
                    </ul>
                    <h3 class="s-list-title">组件</h3>
                    <ul>
                        <li><a href="#autocomplete" data-href="doc/autocomplete.html">AutoComplete</a></li>
                        <li><a href="#dialog" data-href="doc/dialog.html">Dialog</a></li>
                        <li><a href="#pagination" data-href="doc/pagination.html">Pagination</a></li>
                        <li><a href="#slide" data-href="doc/slide.html">Slide &amp; Tab</a></li>
                        <li><a href="#" data-info="beta" class="gray">Tip</a></li>
                        <li><a href="#" data-info="beta" class="gray">Grid</a></li>
                        <li><a href="#" data-info="beta" class="gray">Player</a></li>
                    </ul>
                </div>
                <div class="api-content">
                    API放在这里
                </div>
            </div>
        </div>
        <script src="SyntaxHighlighter/shCore.js"></script>
        <script src="SyntaxHighlighter/allmin.js"></script>
        <script type="text/javascript">
            window.onload = function () {
                dp.SyntaxHighlighter.ClipboardSwf = 'SyntaxHighlighter/clipboard.swf';
                dp.SyntaxHighlighter.HighlightAll('code');
            } 
        </script>
        <script type="text/javascript" src="../src/jquery.js"></script>
        <script type="text/javascript" src="../src/_beta/SimpleCore.js"></script>
        <script type="text/javascript" src="../src/_beta/SimpleTip/SimpleTip.js"></script>
        <script type="text/javascript">
            (function(){
                var ajaxHtmlStore={},
                getHtml=function(url){
                    var temp;
                    if(ajaxHtmlStore[url]){
                        $(".api-content").html(ajaxHtmlStore[url]);
                        dp.SyntaxHighlighter.ClipboardSwf = 'SyntaxHighlighter/clipboard.swf';
                        dp.SyntaxHighlighter.HighlightAll('code');
                    }else{
                        var load=$.loadTip("正在加载API...")
                        $.get(url,function(res){
                            ajaxHtmlStore[url]=res;
                            $(".api-content").html(ajaxHtmlStore[url]);
                            dp.SyntaxHighlighter.ClipboardSwf = 'SyntaxHighlighter/clipboard.swf';
                            dp.SyntaxHighlighter.HighlightAll('code');
                            load.hide();
                        });
                    }
                }
                $(".s-list a,.ajax-load").live("click",function(){
                    var url=$(this).attr("data-href"),beta=$(this).attr("data-info");
                    if(beta){
                        $.alertTip("即将推出,敬请关注...",3000)
                        return false;
                    }
                    getHtml(url);
                    //return false;
                });
				
				var parseHref=function(){
					var location=window.location.href,index=location.indexOf("#"),indexHref=location.substring(index,location.length);
					if(index==-1){
						return false;
					}
					$(".s-list a[href="+indexHref+"]").click();
				}
				parseHref();
            })();
        </script>
    </body>
</html>
